package com.xuerhua.yxt.common.enums;

/**
 * 功能室状态
 * @author hqm
 *
 */
public enum FunctionRoomStatus {
	
	AGREE("000","审批通过"),
	PENDING("001","待处理"),
	REJECT("002","审批驳回"),
	APPLYER_CANCEL("003","申请人取消"),
	APPROVER_CANCEL("004","审批人取消");

	private final String code;
	
	private final String value;
	
	private FunctionRoomStatus(String code, String value) {
		this.code = code;
		this.value = value;
	}

	public static String getValue(String key) {
		if(FunctionRoomStatus.PENDING.getCode().equals(key)) {
			return "等待教研处/办公室审批";
		}
		for(FunctionRoomStatus type : FunctionRoomStatus.values()) {
			if(type.getCode().equals(key)) {
				return type.getValue();
			}
		}
		return "";
	}
	
	public String getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}
	
}
